<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>字体放大</title>
</head>

<body>


<h3>字体放大</h3>
<input type="button" value="放大" onclick="fangda()" />
<div style="font-size:10px;" id="box">javascript很强大.....</div>


</body>

<script type="text/javascript">
function fangda(){
	
	var box = document.getElementById('box');
	
	//让字体大小变大
	var size = parseInt(box.style.fontSize); //默认10px大小
	
	//要在之前的大小基础累加
	box.style.fontSize = size + 10 +'px';

}

//作业：让字体变小
</script>
</html>
